package utils;

/**
 * 上传qiniu 文件类型
 * Created by pujin on 2015/8/28.
 */
public enum QiniuFileType {
    _bitmap(50, "_bitmap"), _imgpath(100, "_imgpath"), _filepath(150, "_filepath"),
    _byteArray(200, "_byteArray"), _filepathwater(250, "_filepathwater");

    private int key;
    private String value;

    private QiniuFileType(int key, String value) {
        this.key = key;
        this.value = value;
    }

    public static QiniuFileType valuesOf(int value) {
        switch (value) {
            case 50:
                return _bitmap;
            case 100:
                return _imgpath;
            case 150:
                return _filepath;
            case 200:
                return _byteArray;
            case 250:
                return _filepathwater;
            default:
                return null;
        }
    }

    public int getKey() {
        return key;
    }

    public void setKey(int key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

}
